package com.scuec.trainingmanagementsys.service.impl;

import com.scuec.trainingmanagementsys.entity.Student;
import com.scuec.trainingmanagementsys.mapper.StudentMapper;
import com.scuec.trainingmanagementsys.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDate;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@Service
public class StudentServiceImpl implements StudentService {

    @Autowired
    private StudentMapper studentMapper;

    @Override
    public List<Student> getAllStudents() {
        return studentMapper.getAllStudents();
    }

    @Override
    public Student getStudentByNumber(String studentNumber) {
        return studentMapper.getStudentByNumber(studentNumber);
    }

    @Override
    public List<Student> getStudentsByName(String studentName) {
        return studentMapper.getStudentsByName(studentName);
    }

    @Override
    public List<Student> getStudentsByGender(String gender) {
        return studentMapper.getStudentsByGender(gender);
    }

    @Override
    public List<Student> getStudentsByCollege(String college) {
        return studentMapper.getStudentsByCollege(college);
    }

    @Override
    public List<Student> getStudentsByConditions(String studentNumber, String studentName, String gender, String college) {
        return studentMapper.getStudentsByConditions(studentNumber, studentName, gender, college);
    }

    @Override
    public int deleteStudentByNumber(String studentNumber) {
        return studentMapper.deleteStudentByNumber(studentNumber);
    }

    @Override
    public int updateStudent(Student student) {
        return studentMapper.updateStudent(student);
    }

    @Override
    public int insertStudent(Student student) {
        return studentMapper.insertStudent(student);
    }

    @Override
    public int deleteStudentsByNumbers(List<String> studentNumbers) {
        return studentMapper.deleteStudentsByNumbers(studentNumbers);
    }

    @Override
    public Student getStudentByNumberAndPassword(String studentNumber, String studentPassword) {
        return studentMapper.getStudentByNumberAndPassword(studentNumber, studentPassword);
    }

    @Override
    public Student getStudentProfile(String studentNumber) {
        return studentMapper.getStudentProfile(studentNumber);
    }

    @Override
    public int getStudentCount() {
        return studentMapper.getStudentCount();
    }


}